import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
import user  from './user'
export default new Vuex.Store({
  state: {
    staff:{
      nickname:''
    },
    sponsor:{
      sort:'',
      project_name:'',
      days:'',
      money:'',
      desc:'',
      thumbnail_file:'',
      long_pic_file :'',
      detail_pic_file:[]
    }
  },
  mutations: {
    setSataff(state , payload){

      state.staff = payload
    },
    basic_info(state,basic_data){
      state.sponsor.sort = basic_data.sort;
      state.sponsor.project_name = basic_data.project_name;
      state.sponsor.days = basic_data.days;
      state.sponsor.money = basic_data.money;
      state.sponsor.desc = basic_data.desc;
      state.sponsor.thumbnail_file = basic_data.thumbnail_file;
      state.sponsor.long_pic_file = basic_data.long_pic_file;
      state.sponsor.detail_pic_file = basic_data.detail_pic_file;
      state.sponsor.video_file = basic_data.video_file;
    }
  },
  actions: {
  },
  modules: {
    user
  },
  getters:{
    getStaff(state){
      return state.staff

    }
  }
})
